﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;

namespace MyEartags.Hint
{
    public class GestationAppService : ApplicationService, IGestationAppService
    {
        private readonly IRepository<Gestation, int> _gestationRepository;

        public GestationAppService(IRepository<Gestation, int> gestationRepository)
        {
            _gestationRepository = gestationRepository;
        }

        /// <summary>
        /// 首次妊娠提示信息
        /// </summary>
        /// <returns></returns>
        public async Task<List<GestationDto>> GetGestationList()
        {
            var list = await _gestationRepository.GetListAsync();
            return ObjectMapper.Map<List<Gestation>, List<GestationDto>>(list);
        }
    }
}
